Bridging Java and AspectJ through Explicit Join Points TECHNICAL REPORT ejp-200705-1

نویسندگان

  • Kevin Hoffman
  • Patrick Eugster
چکیده

Through AspectJ, aspect-oriented programming (AOP) is becoming of increasing interest and availability to Java programmers as it matures as a methodology for improved software modularity via the separation of cross-cutting concerns. AOP proponents often advocate a development strategy where Java programmers write the main application, ignoring cross-cutting concerns, and then AspectJ programmers, domain experts in their specific concerns, weave in the logic for these more specialized cross-cutting concerns. However, several authors have recently debated the merits of this strategy by empirically showing certain drawbacks. The proposed solutions paint a different development strategy where base code and aspect programmers are aware of each other (to varying degrees) and interactions between cross-cutting concerns are planned for early on. Herein we explore new possibilities in the language design space that open up when the base code is aware of cross-cutting aspects. Using our insights from this exploration we concretize these new possibilities by extending AspectJ with concise yet powerful constructs, while maintaining full backwards compatibility. These new constructs allow base code and aspects to cooperate in ways that were previously not possible: arbitrary blocks of code can be advised, advice can be explicitly parameterized, base code can guide aspects in where to apply advice, and aspects can statically enforce new constraints upon the base code that they advise. These new techniques allow aspect modularity and program safety to increase. We illustrate the value of our extensions through an example based on transactions.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

An Overview of AspectJ

AspectJTM is a simple and practical aspect-oriented extension to JavaTM. With just a few new constructs, AspectJ provides support for modular implementation of a range of crosscutting concerns. In AspectJ’s dynamic join point model, join points are well-defined points in the execution of the program; pointcuts are collections of join points; advice are special method-like constructs that can be...

متن کامل

A Formal Semantics of Flexible and Safe Pointcut/Advice Bindings

AspectJ was designed as a seamless aspect-oriented extension of the Java programming language. However, unlike Java, AspectJ does not have a safe type system: an accepted binding between a pointcut and an advice can give rise to type errors at runtime. In addition, AspectJ’s typing rules are severely restricting the definition of certain generic advice behavior. In this technical report, we pre...

متن کامل

Communication History Patterns: Direct Implementation of Protocol Specifications

The interactions between separated crosscutting concerns and the base modularity of a system must be specified. These specifications include descriptions of the join points in the base code where behaviour is to be added or replaced. At present, the means available for describing join points generally treat each join point in isolation, rather than allowing multiple join points to be related to...

متن کامل

Extended Code Coverage for AspectJ-Based Runtime Verification Tools

Many runtime verification tools for the Java virtual machine rely on aspect-oriented programming, particularly on AspectJ, to weave the verification logic into the observed program. However, AspectJ imposes several limitations on the verification tools, such as a restricted join point model and the inability of weaving certain classes, particularly the Java and Android class libraries. In this ...

متن کامل

A Join Point for Synchronized Block in AspectJ

Synchronization is a key software concern that could be advised not only for synchronization in a multi-threaded program but also for treating the distributed environment as the crosscutting concern. However, the synchronized block in Java has not yet been treated in AspectJ or in any other Aspect-Oriented Programming framework. This paper develops a synchronized block join point model which al...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007